
using Qdb.Config;
using Qdb.Internal;
using Qdb.Internal.Config;

namespace Qdb.Internal.Config
{
	public class QdbLegacyConfigurationBridge
	{
		public static IEmbeddedConfiguration AsEmbeddedConfiguration(IConfiguration legacy
			)
		{
			return new EmbeddedConfigurationImpl(legacy);
		}

		public static ICommonConfiguration AsCommonConfiguration(IConfiguration config)
		{
			return new CommonConfigurationImpl((Config4Impl)config);
		}

		public static Config4Impl AsLegacy(object config)
		{
			return ((ILegacyConfigurationProvider)config).Legacy();
		}

		public static IFileConfiguration AsFileConfiguration(Config4Impl legacy)
		{
			return new FileConfigurationImpl(legacy);
		}
	}
}
